Skip to content

main: hint at device state when a hardware wallet fails to open - #4668

Open
reservedbytes wants to merge 1 commit into
monero-project:masterfrom
reservedbytes:hw-wallet-open-error
Open

main: hint at device state when a hardware wallet fails to open#4668
reservedbytes wants to merge 1 commit into
monero-project:masterfrom
reservedbytes:hw-wallet-open-error

Conversation

@reservedbytes

Copy link
Copy Markdown

Problem

When a hardware wallet fails to open — locked, disconnected, or with the Monero app
closed — the password dialog shows the raw error from the device layer and nothing
else. For a locked Ledger that is:

Couldn't open wallet: Wrong Device Status: 0x5515 (UNKNOWN), EXPECTED 0x9000 (UNKNOWN), MASK 0xffff

Nothing there tells the user to unlock the device, so it reads like a failure of the
wallet rather than a device that needs attention.

Change

When a wallet fails to open and the wallet is hardware-backed, append a line saying
what to check. The device type comes from wallet.isLedger() / wallet.isTrezor(),
matching how TxConfirmationDialog.qml already distinguishes them, so Trezor users
are not told to open a Monero app that does not exist on their device.

Couldn't open wallet: <device error>
Make sure your Ledger is connected and unlocked, and the Monero app is open.

Why detect the device instead of matching the error text

Device-layer error strings change over time: the status word name in this error was
renamed, and monero-project/monero#10997 replaces the hex dump altogether. Matching on
isHwBacked() is unaffected by wording changes, and covers device failures that have
not been catalogued yet.

Related prior work: #3508.

Closes #3507

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ledger Nanox : handle locked device gracefully

3 participants